//
//  selectCity.m
//  cityStar
//
//  Created by joyban on 15-1-27.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "selectCity.h"

@implementation selectCity

-(id)init
{
    if (self = [super init]) {
    }
    return self;
}
+(selectCity *) shardUserInfo// 单例
{
    static selectCity *sharedInstance = nil;
    static dispatch_once_t oncePredicate;
    dispatch_once(&oncePredicate, ^{
        sharedInstance = [[self alloc] init];
    });
    return sharedInstance;
}

-(void)setClasscityArray:(NSMutableArray *)selectCity
{
    self.cityArray = selectCity;
    self.cityNameArray  = [[NSMutableArray alloc]init];
    self.cityIsopenArray  = [[NSMutableArray alloc]init];
    self.cityIdArray  = [[NSMutableArray alloc]init];

    for (NSDictionary *dict in selectCity) {
        NSString *name = dict[@"name"];
        NSString *CityId = [NSString stringWithFormat:@"%@",dict[@"id"]];
        NSString *CityIsopen = [NSString stringWithFormat:@"%@",dict[@"isopen"]];
        [self.cityIdArray addObject:CityId];
        [self.cityIsopenArray addObject:CityIsopen];
        [self.cityNameArray addObject:name];
    }
}


@end

